package com.zeng.stpro.commons.utils;

/**
 * @ClassName Constant
 * @Description TODO
 * @Author zhijun zeng at 0:45 2021/2/4
 * @Version 1.0
 **/
public class Constant {

    /**
     * 统一返回前端的KEY
     */
    public static final String LIST = "list";
    public static final String PAGE = "page";
    public static final String OBJ = "obj";
    public static final String TOKEN = "token";
    public static final String CAPTCHA_KEY = "verifycode";


    /**
     * 定义 Redis 的 hash 型数据的 KEY
     * 组建 HASH 数据
     * {username,key,value}
     */
    public enum RedisHashKey {
        TOKEN("token"),
        USER("user"),
        PROMS("permissions"),
        MENULIST("menulist")
        ;
        private String value;
        private RedisHashKey(String value) {
            this.value = value;
        }

        public String val() {
            return this.value;
        }
    }

    /**
     *
     * SysUser
     * 用户类型
     */
    public enum UserType {
        SUPER_ADMIN("00"),//超级用户
        INNER_USER("10"), //内部用户
        REGIST_USER("20"),//注册用户
        ;
        private String value;
        UserType(String value) {
            this.value = value;
        }

        public String val() {
            return this.value;
        }
    }

    /**
     * SysMenu 的 menu_type
     */
    public enum MenuType {
        /**
         * 目录
         */
        CATALOG(0),
        /**
         * 菜单
         */
        MENU(1),
        /**
         * 按钮
         */
        BUTTON(2);

        private Integer value;

        private MenuType() {

        }
        private MenuType(Integer value) {
            this.value = value;
        }

        public Integer val() {
            return value;
        }
    }

}
